#pragma once
#include<share.h>
#include<vector>
#include<memory>
#include <pcl/pcl_macros.h>
namespace FileMapping{
	class PCDFileMappingStream1;
	class PCL_EXPORTS PCDFileMappingStream1Wrapper {

	public:

		PCDFileMappingStream1Wrapper(PCDFileMappingStream1& pcd_stream);
		
		bool is_open();
		
		size_t size();

		bool open(size_t height, size_t width);

		PCDFileMappingStream1& get_stream();

		~PCDFileMappingStream1Wrapper();

		using Ptr = std::shared_ptr<PCDFileMappingStream1Wrapper>;
	private:
		PCDFileMappingStream1& _pcd_file_stream;
	};

	PCL_EXPORTS void
		copyPointCloud(PCDFileMappingStream1Wrapper& cloud_in, std::vector<std::size_t>& index,
			PCDFileMappingStream1Wrapper& cloud_out);
}

